package action_行为型.state_pattern_状态模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/09/17:37
 * @Description:
 */
public class StatePatternDemo {
	public static void main(String[] args) {
		Context context = new Context();
		StartState startState = new StartState(context);
		StopState stopState = new StopState(context);

		startState.doAction(context);

		System.err.println(context.getState().toString());

		stopState.doAction(context);

		System.err.println(context.getState().toString());

	}
}
